package com.vids.model.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Date;


/**
 * @author ly
 */
public class ResponseStatus {
    /**
     * 对应操作的URL
     */
    private String RequestURL;
    /**
     * 0	正常
     * 1	未知错误
     * 2	繁忙
     * 3	错误
     * 4	无效操作
     * 5	无效XML格式
     * 6	无效XML内容
     * 7	JSON格式无效
     * 8	JSON内容无效
     * 9	系统重启中
     */
    private Integer StatusCode;
    /**
     * 状态描述
     */
    private String StatusString;
    /**
     * 资源IDPOST方法创建资源时会返回ID，创建成功后必须返回新的ID，创建失败则无此ID
     */
    private String Id;
    /**
     * 日期时间当前时间，用于需要校时的场合
     */
    private Date LocalTime;


    public ResponseStatus(String requestURL, Integer statusCode, Date localTime) {
        RequestURL = requestURL;
        StatusCode = statusCode;
        LocalTime = localTime;
    }



    public ResponseStatus() {

    }

    @JsonProperty(value = "RequestURL")
    public String getRequestURL() {
        return RequestURL;
    }

    public void setRequestURL(String requestURL) {
        RequestURL = requestURL;
    }

    @JsonProperty(value = "StatusCode")
    public Integer getStatusCode() {
        return StatusCode;
    }

    public void setStatusCode(Integer statusCode) {
        StatusCode = statusCode;
    }

    @JsonProperty(value = "StatusString")
    //@ApiModelProperty("返回状态描述")
    public String getStatusString() {
        return StatusString;
    }

    public void setStatusString(String statusString) {
        StatusString = statusString;
    }

    @JsonProperty(value = "Id")
    public String getId() {
        return Id;
    }

    public void setId(String id) {
        Id = id;
    }

    @JsonProperty(value = "LocalTime")
    @JsonFormat(pattern = "yyyyMMddHHmmss")
    public Date getLocalTime() {
        return LocalTime;
    }

    public void setLocalTime(Date localTime) {
        LocalTime = localTime;
    }
}
